package com.dale.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

/**
 * @author Gyt
 * @create 2021-05-24 - 14:23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("m_comment")
public class Comment {
    @TableId(value = "cid", type = IdType.AUTO)
    private Long cid;

    private Long uid;

    private Long parentCid;  //哪个评论的

    private Long bid; //哪个博客的

    private String touser;

    private Long touserId;


    @NotBlank
    private String author;

    @NotBlank
    private String avatar;

    @NotBlank
    private LocalDateTime created;


    private LocalDateTime updated;

    @NotBlank
    private String content;


    @TableLogic
    private Integer delFlag;

}
